import Layout from '@/page/index/'

/**
 * 通用路由页
 */
export default [
    {
        path: '/',
        name: '根路径', // 重名会导致无法跳转,注意重名问题
        redirect: '/wel'
    },
    {
        path: '/wel',
        component: () => import('@/page/index/index.vue'),
        redirect: '/wel/index',
        children: [
            {
                path: 'index',
                name: '首页',
                meta: {
                    i18n: 'dashboard'
                },
                component: () =>
                    import( /* webpackChunkName: "views" */ '@/views/wel/index.vue')
            },
        ]
    },
    {
        path: '/login',
        name: '登录页',
        component: () => import('@/page/login/index.vue'),
        meta: {
            keepAlive: true,
            isTab: false,
            isAuth: false
        }
    }, {
        path: '/lock',
        name: '锁屏页',
        component: () => import('@/page/lock/index.vue'),
        meta: {
            keepAlive: true,
            isTab: false,
            isAuth: false
        }
    },
    {
        path: '/404',
        component: () =>
            import( /* webpackChunkName: "page" */ '@/components/error-page/404.vue'),
        name: '404',
        meta: {
            keepAlive: true,
            isTab: false,
            isAuth: false
        }
    },
    {
        path: '/403',
        component: () =>
            import( /* webpackChunkName: "page" */ '@/components/error-page/403.vue'),
        name: '403',
        meta: {
            keepAlive: true,
            isTab: false,
            isAuth: false
        }
    },
    {
        path: '/500',
        component: () =>
            import( /* webpackChunkName: "page" */ '@/components/error-page/500.vue'),
        name: '500',
        meta: {
            keepAlive: true,
            isTab: false,
            isAuth: false
        }
    },
    {
        path: "/:pathMatch(.*)*",
        redirect: '/404'
    },
    {
        path: '/iframe',
        component: Layout,
        redirect: '/iframe',
        children: [{
            path: '',
            name: '',
            component: () =>
                import( /* webpackChunkName: "views" */ '@/components/iframe/main.vue')
        }]
    },
]